
'===============================================================================
'  Generated From - VbNet_SQL_dOOdads_BusinessEntity.vbgen
' 
'  ** IMPORTANT  **
'  How to Generate your stored procedures:
' 
'  SQL        = SQL_StoredProcs.vbgen
'  ACCESS     = Access_StoredProcs.vbgen
'  ORACLE     = Oracle_StoredProcs.vbgen
'  FIREBIRD   = FirebirdStoredProcs.vbgen
'  POSTGRESQL = PostgreSQL_StoredProcs.vbgen
'
'  The supporting base class SqlClientEntity is in the Architecture directory in "dOOdads".
'  
'  This object is 'MustInherit' which means you need to inherit from it to be able
'  to instantiate it.  This is very easilly done. You can Override properties and
'  methods in your derived class, this allows you to regenerate this class at any
'  time and not worry about overwriting custom code. 
'
'  NEVER EDIT THIS FILE.
'
'  Public Class YourObject
'    Inherits _YourObject
'
'  End Class
'
'===============================================================================

' Generated by MyGeneration Version # (1.3.0.3)

Imports System
Imports System.Data
Imports System.Data.SqlClient
Imports System.Collections
Imports System.Collections.Specialized

Imports MyGeneration.dOOdads

NameSpace ClassSigeco

Public MustInherit Class _si_compra
	Inherits SqlClientEntity

		Public Sub New() 
			Me.QuerySource = "si_compra"
			Me.MappingName = "si_compra"
		End Sub

	'=================================================================
	'  Public Overrides Sub AddNew()
	'=================================================================
	'
	'=================================================================
	Public Overrides Sub AddNew()
		MyBase.AddNew()
				
	End Sub
	
	Public Overrides Sub FlushData()
		Me._whereClause = nothing
		Me._aggregateClause = nothing		
		MyBase.FlushData()
	End Sub
	
		
	'=================================================================
	'  	Public Function LoadAll() As Boolean
	'=================================================================
	'  Loads all of the records in the database, and sets the currentRow to the first row
	'=================================================================
	Public Function LoadAll() As Boolean
	
		Dim parameters As ListDictionary = Nothing
		
		
    	Return MyBase.LoadFromSql("[" + Me.SchemaStoredProcedure + "proc_si_compraLoadAll]", parameters)
		
	End Function

	'=================================================================
	' Public Overridable Function LoadByPrimaryKey()  As Boolean
	'=================================================================
	'  Loads a single row of via the primary key
	'=================================================================
        Public Overridable Function LoadByPrimaryKey(ByVal IdCompra As Integer) As Boolean

            Dim parameters As ListDictionary = New ListDictionary()
            parameters.Add(_si_compra.Parameters.IdCompra, IdCompra)


            Return MyBase.LoadFromSql("[" + Me.SchemaStoredProcedure + "proc_si_compraLoadByPrimaryKey]", parameters)

        End Function

#Region "Parameters"
        Protected Class Parameters

            Public Shared ReadOnly Property IdCompra() As SqlParameter
                Get
                    Return New SqlParameter("@IdCompra", SqlDbType.Int, 0)
                End Get
            End Property

            Public Shared ReadOnly Property NroComprobante() As SqlParameter
                Get
                    Return New SqlParameter("@NroComprobante", SqlDbType.NVarChar, 50)
                End Get
            End Property

            Public Shared ReadOnly Property Fecha() As SqlParameter
                Get
                    Return New SqlParameter("@Fecha", SqlDbType.DateTime, 0)
                End Get
            End Property

            Public Shared ReadOnly Property IdProveedor() As SqlParameter
                Get
                    Return New SqlParameter("@IdProveedor", SqlDbType.Int, 0)
                End Get
            End Property

            Public Shared ReadOnly Property FechaVencimiento() As SqlParameter
                Get
                    Return New SqlParameter("@FechaVencimiento", SqlDbType.DateTime, 0)
                End Get
            End Property

            Public Shared ReadOnly Property Condicion() As SqlParameter
                Get
                    Return New SqlParameter("@Condicion", SqlDbType.NVarChar, 50)
                End Get
            End Property

            Public Shared ReadOnly Property Estado() As SqlParameter
                Get
                    Return New SqlParameter("@Estado", SqlDbType.NVarChar, 50)
                End Get
            End Property

            Public Shared ReadOnly Property IdOrdenCompra() As SqlParameter
                Get
                    Return New SqlParameter("@IdOrdenCompra", SqlDbType.Int, 0)
                End Get
            End Property

            Public Shared ReadOnly Property IdAdministrador() As SqlParameter
                Get
                    Return New SqlParameter("@IdAdministrador", SqlDbType.Int, 0)
                End Get
            End Property

            Public Shared ReadOnly Property TotalFactura() As SqlParameter
                Get
                    Return New SqlParameter("@TotalFactura", SqlDbType.Decimal, 0)
                End Get
            End Property

            Public Shared ReadOnly Property TotalFacturaSaldo() As SqlParameter
                Get
                    Return New SqlParameter("@TotalFacturaSaldo", SqlDbType.Decimal, 0)
                End Get
            End Property

            Public Shared ReadOnly Property TotalFacturaIVA() As SqlParameter
                Get
                    Return New SqlParameter("@TotalFacturaIVA", SqlDbType.Decimal, 0)
                End Get
            End Property

            Public Shared ReadOnly Property ActualizadoPor() As SqlParameter
                Get
                    Return New SqlParameter("@ActualizadoPor", SqlDbType.Int, 0)
                End Get
            End Property

            Public Shared ReadOnly Property ActualizadoFecha() As SqlParameter
                Get
                    Return New SqlParameter("@ActualizadoFecha", SqlDbType.DateTime, 0)
                End Get
            End Property

            Public Shared ReadOnly Property IdCaja() As SqlParameter
                Get
                    Return New SqlParameter("@IdCaja", SqlDbType.Int, 0)
                End Get
            End Property

        End Class
#End Region

#Region "ColumnNames"
        Public Class ColumnNames

            Public Const IdCompra As String = "idCompra"
            Public Const NroComprobante As String = "nroComprobante"
            Public Const Fecha As String = "fecha"
            Public Const IdProveedor As String = "idProveedor"
            Public Const FechaVencimiento As String = "fechaVencimiento"
            Public Const Condicion As String = "condicion"
            Public Const Estado As String = "estado"
            Public Const IdOrdenCompra As String = "idOrdenCompra"
            Public Const IdAdministrador As String = "idAdministrador"
            Public Const TotalFactura As String = "totalFactura"
            Public Const TotalFacturaSaldo As String = "totalFacturaSaldo"
            Public Const TotalFacturaIVA As String = "totalFacturaIVA"
            Public Const ActualizadoPor As String = "actualizadoPor"
            Public Const ActualizadoFecha As String = "actualizadoFecha"
            Public Const IdCaja As String = "idCaja"

            Public Shared Function ToPropertyName(ByVal columnName As String) As String

                If ht Is Nothing Then

                    ht = New Hashtable

                    ht(IdCompra) = _si_compra.PropertyNames.IdCompra
                    ht(NroComprobante) = _si_compra.PropertyNames.NroComprobante
                    ht(Fecha) = _si_compra.PropertyNames.Fecha
                    ht(IdProveedor) = _si_compra.PropertyNames.IdProveedor
                    ht(FechaVencimiento) = _si_compra.PropertyNames.FechaVencimiento
                    ht(Condicion) = _si_compra.PropertyNames.Condicion
                    ht(Estado) = _si_compra.PropertyNames.Estado
                    ht(IdOrdenCompra) = _si_compra.PropertyNames.IdOrdenCompra
                    ht(IdAdministrador) = _si_compra.PropertyNames.IdAdministrador
                    ht(TotalFactura) = _si_compra.PropertyNames.TotalFactura
                    ht(TotalFacturaSaldo) = _si_compra.PropertyNames.TotalFacturaSaldo
                    ht(TotalFacturaIVA) = _si_compra.PropertyNames.TotalFacturaIVA
                    ht(ActualizadoPor) = _si_compra.PropertyNames.ActualizadoPor
                    ht(ActualizadoFecha) = _si_compra.PropertyNames.ActualizadoFecha
                    ht(IdCaja) = _si_compra.PropertyNames.IdCaja

                End If

                Return CType(ht(columnName), String)

            End Function

            Private Shared ht As Hashtable = Nothing
        End Class
#End Region

#Region "PropertyNames"
        Public Class PropertyNames

            Public Const IdCompra As String = "IdCompra"
            Public Const NroComprobante As String = "NroComprobante"
            Public Const Fecha As String = "Fecha"
            Public Const IdProveedor As String = "IdProveedor"
            Public Const FechaVencimiento As String = "FechaVencimiento"
            Public Const Condicion As String = "Condicion"
            Public Const Estado As String = "Estado"
            Public Const IdOrdenCompra As String = "IdOrdenCompra"
            Public Const IdAdministrador As String = "IdAdministrador"
            Public Const TotalFactura As String = "TotalFactura"
            Public Const TotalFacturaSaldo As String = "TotalFacturaSaldo"
            Public Const TotalFacturaIVA As String = "TotalFacturaIVA"
            Public Const ActualizadoPor As String = "ActualizadoPor"
            Public Const ActualizadoFecha As String = "ActualizadoFecha"
            Public Const IdCaja As String = "IdCaja"

            Public Shared Function ToColumnName(ByVal propertyName As String) As String

                If ht Is Nothing Then

                    ht = New Hashtable

                    ht(IdCompra) = _si_compra.ColumnNames.IdCompra
                    ht(NroComprobante) = _si_compra.ColumnNames.NroComprobante
                    ht(Fecha) = _si_compra.ColumnNames.Fecha
                    ht(IdProveedor) = _si_compra.ColumnNames.IdProveedor
                    ht(FechaVencimiento) = _si_compra.ColumnNames.FechaVencimiento
                    ht(Condicion) = _si_compra.ColumnNames.Condicion
                    ht(Estado) = _si_compra.ColumnNames.Estado
                    ht(IdOrdenCompra) = _si_compra.ColumnNames.IdOrdenCompra
                    ht(IdAdministrador) = _si_compra.ColumnNames.IdAdministrador
                    ht(TotalFactura) = _si_compra.ColumnNames.TotalFactura
                    ht(TotalFacturaSaldo) = _si_compra.ColumnNames.TotalFacturaSaldo
                    ht(TotalFacturaIVA) = _si_compra.ColumnNames.TotalFacturaIVA
                    ht(ActualizadoPor) = _si_compra.ColumnNames.ActualizadoPor
                    ht(ActualizadoFecha) = _si_compra.ColumnNames.ActualizadoFecha
                    ht(IdCaja) = _si_compra.ColumnNames.IdCaja

                End If

                Return CType(ht(propertyName), String)

            End Function

            Private Shared ht As Hashtable = Nothing

        End Class
#End Region

#Region "StringPropertyNames"
        Public Class StringPropertyNames

            Public Const IdCompra As String = "s_IdCompra"
            Public Const NroComprobante As String = "s_NroComprobante"
            Public Const Fecha As String = "s_Fecha"
            Public Const IdProveedor As String = "s_IdProveedor"
            Public Const FechaVencimiento As String = "s_FechaVencimiento"
            Public Const Condicion As String = "s_Condicion"
            Public Const Estado As String = "s_Estado"
            Public Const IdOrdenCompra As String = "s_IdOrdenCompra"
            Public Const IdAdministrador As String = "s_IdAdministrador"
            Public Const TotalFactura As String = "s_TotalFactura"
            Public Const TotalFacturaSaldo As String = "s_TotalFacturaSaldo"
            Public Const TotalFacturaIVA As String = "s_TotalFacturaIVA"
            Public Const ActualizadoPor As String = "s_ActualizadoPor"
            Public Const ActualizadoFecha As String = "s_ActualizadoFecha"
            Public Const IdCaja As String = "s_IdCaja"

        End Class
#End Region

#Region "Properties"
        Public Overridable Property IdCompra() As Integer
            Get
                Return MyBase.Getint(ColumnNames.IdCompra)
            End Get
            Set(ByVal Value As Integer)
                MyBase.Setint(ColumnNames.IdCompra, Value)
            End Set
        End Property

        Public Overridable Property NroComprobante() As String
            Get
                Return MyBase.Getstring(ColumnNames.NroComprobante)
            End Get
            Set(ByVal Value As String)
                MyBase.Setstring(ColumnNames.NroComprobante, Value)
            End Set
        End Property

        Public Overridable Property Fecha() As DateTime
            Get
                Return MyBase.GetDateTime(ColumnNames.Fecha)
            End Get
            Set(ByVal Value As DateTime)
                MyBase.SetDateTime(ColumnNames.Fecha, Value)
            End Set
        End Property

        Public Overridable Property IdProveedor() As Integer
            Get
                Return MyBase.Getint(ColumnNames.IdProveedor)
            End Get
            Set(ByVal Value As Integer)
                MyBase.Setint(ColumnNames.IdProveedor, Value)
            End Set
        End Property

        Public Overridable Property FechaVencimiento() As DateTime
            Get
                Return MyBase.GetDateTime(ColumnNames.FechaVencimiento)
            End Get
            Set(ByVal Value As DateTime)
                MyBase.SetDateTime(ColumnNames.FechaVencimiento, Value)
            End Set
        End Property

        Public Overridable Property Condicion() As String
            Get
                Return MyBase.Getstring(ColumnNames.Condicion)
            End Get
            Set(ByVal Value As String)
                MyBase.Setstring(ColumnNames.Condicion, Value)
            End Set
        End Property

        Public Overridable Property Estado() As String
            Get
                Return MyBase.Getstring(ColumnNames.Estado)
            End Get
            Set(ByVal Value As String)
                MyBase.Setstring(ColumnNames.Estado, Value)
            End Set
        End Property

        Public Overridable Property IdOrdenCompra() As Integer
            Get
                Return MyBase.Getint(ColumnNames.IdOrdenCompra)
            End Get
            Set(ByVal Value As Integer)
                MyBase.Setint(ColumnNames.IdOrdenCompra, Value)
            End Set
        End Property

        Public Overridable Property IdAdministrador() As Integer
            Get
                Return MyBase.Getint(ColumnNames.IdAdministrador)
            End Get
            Set(ByVal Value As Integer)
                MyBase.Setint(ColumnNames.IdAdministrador, Value)
            End Set
        End Property

        Public Overridable Property TotalFactura() As Decimal
            Get
                Return MyBase.Getdecimal(ColumnNames.TotalFactura)
            End Get
            Set(ByVal Value As Decimal)
                MyBase.Setdecimal(ColumnNames.TotalFactura, Value)
            End Set
        End Property

        Public Overridable Property TotalFacturaSaldo() As Decimal
            Get
                Return MyBase.Getdecimal(ColumnNames.TotalFacturaSaldo)
            End Get
            Set(ByVal Value As Decimal)
                MyBase.Setdecimal(ColumnNames.TotalFacturaSaldo, Value)
            End Set
        End Property

        Public Overridable Property TotalFacturaIVA() As Decimal
            Get
                Return MyBase.Getdecimal(ColumnNames.TotalFacturaIVA)
            End Get
            Set(ByVal Value As Decimal)
                MyBase.Setdecimal(ColumnNames.TotalFacturaIVA, Value)
            End Set
        End Property

        Public Overridable Property ActualizadoPor() As Integer
            Get
                Return MyBase.Getint(ColumnNames.ActualizadoPor)
            End Get
            Set(ByVal Value As Integer)
                MyBase.Setint(ColumnNames.ActualizadoPor, Value)
            End Set
        End Property

        Public Overridable Property ActualizadoFecha() As DateTime
            Get
                Return MyBase.GetDateTime(ColumnNames.ActualizadoFecha)
            End Get
            Set(ByVal Value As DateTime)
                MyBase.SetDateTime(ColumnNames.ActualizadoFecha, Value)
            End Set
        End Property

        Public Overridable Property IdCaja() As Integer
            Get
                Return MyBase.Getint(ColumnNames.IdCaja)
            End Get
            Set(ByVal Value As Integer)
                MyBase.Setint(ColumnNames.IdCaja, Value)
            End Set
        End Property


#End Region
	
	#Region "String Properties" 

		Public Overridable Property s_IdCompra As String
			Get
				If Me.IsColumnNull(ColumnNames.IdCompra) Then
					Return String.Empty
				Else
					Return MyBase.GetintAsString(ColumnNames.IdCompra)
				End If
			End Get
			Set(ByVal Value As String)
				If String.Empty = value Then
					Me.SetColumnNull(ColumnNames.IdCompra)
				Else
					Me.IdCompra = MyBase.SetintAsString(ColumnNames.IdCompra, Value)
				End If
			End Set
		End Property

		Public Overridable Property s_NroComprobante As String
			Get
				If Me.IsColumnNull(ColumnNames.NroComprobante) Then
					Return String.Empty
				Else
					Return MyBase.GetstringAsString(ColumnNames.NroComprobante)
				End If
			End Get
			Set(ByVal Value As String)
				If String.Empty = value Then
					Me.SetColumnNull(ColumnNames.NroComprobante)
				Else
					Me.NroComprobante = MyBase.SetstringAsString(ColumnNames.NroComprobante, Value)
				End If
			End Set
		End Property

		Public Overridable Property s_Fecha As String
			Get
				If Me.IsColumnNull(ColumnNames.Fecha) Then
					Return String.Empty
				Else
					Return MyBase.GetDateTimeAsString(ColumnNames.Fecha)
				End If
			End Get
			Set(ByVal Value As String)
				If String.Empty = value Then
					Me.SetColumnNull(ColumnNames.Fecha)
				Else
					Me.Fecha = MyBase.SetDateTimeAsString(ColumnNames.Fecha, Value)
				End If
			End Set
		End Property

		Public Overridable Property s_IdProveedor As String
			Get
				If Me.IsColumnNull(ColumnNames.IdProveedor) Then
					Return String.Empty
				Else
					Return MyBase.GetintAsString(ColumnNames.IdProveedor)
				End If
			End Get
			Set(ByVal Value As String)
				If String.Empty = value Then
					Me.SetColumnNull(ColumnNames.IdProveedor)
				Else
					Me.IdProveedor = MyBase.SetintAsString(ColumnNames.IdProveedor, Value)
				End If
			End Set
		End Property

		Public Overridable Property s_FechaVencimiento As String
			Get
				If Me.IsColumnNull(ColumnNames.FechaVencimiento) Then
					Return String.Empty
				Else
					Return MyBase.GetDateTimeAsString(ColumnNames.FechaVencimiento)
				End If
			End Get
			Set(ByVal Value As String)
				If String.Empty = value Then
					Me.SetColumnNull(ColumnNames.FechaVencimiento)
				Else
					Me.FechaVencimiento = MyBase.SetDateTimeAsString(ColumnNames.FechaVencimiento, Value)
				End If
			End Set
		End Property

		Public Overridable Property s_Condicion As String
			Get
				If Me.IsColumnNull(ColumnNames.Condicion) Then
					Return String.Empty
				Else
					Return MyBase.GetstringAsString(ColumnNames.Condicion)
				End If
			End Get
			Set(ByVal Value As String)
				If String.Empty = value Then
					Me.SetColumnNull(ColumnNames.Condicion)
				Else
					Me.Condicion = MyBase.SetstringAsString(ColumnNames.Condicion, Value)
				End If
			End Set
		End Property

		Public Overridable Property s_Estado As String
			Get
				If Me.IsColumnNull(ColumnNames.Estado) Then
					Return String.Empty
				Else
					Return MyBase.GetstringAsString(ColumnNames.Estado)
				End If
			End Get
			Set(ByVal Value As String)
				If String.Empty = value Then
					Me.SetColumnNull(ColumnNames.Estado)
				Else
					Me.Estado = MyBase.SetstringAsString(ColumnNames.Estado, Value)
				End If
			End Set
		End Property

		Public Overridable Property s_IdOrdenCompra As String
			Get
				If Me.IsColumnNull(ColumnNames.IdOrdenCompra) Then
					Return String.Empty
				Else
					Return MyBase.GetintAsString(ColumnNames.IdOrdenCompra)
				End If
			End Get
			Set(ByVal Value As String)
				If String.Empty = value Then
					Me.SetColumnNull(ColumnNames.IdOrdenCompra)
				Else
					Me.IdOrdenCompra = MyBase.SetintAsString(ColumnNames.IdOrdenCompra, Value)
				End If
			End Set
		End Property

		Public Overridable Property s_IdAdministrador As String
			Get
				If Me.IsColumnNull(ColumnNames.IdAdministrador) Then
					Return String.Empty
				Else
					Return MyBase.GetintAsString(ColumnNames.IdAdministrador)
				End If
			End Get
			Set(ByVal Value As String)
				If String.Empty = value Then
					Me.SetColumnNull(ColumnNames.IdAdministrador)
				Else
					Me.IdAdministrador = MyBase.SetintAsString(ColumnNames.IdAdministrador, Value)
				End If
			End Set
		End Property

		Public Overridable Property s_TotalFactura As String
			Get
				If Me.IsColumnNull(ColumnNames.TotalFactura) Then
					Return String.Empty
				Else
					Return MyBase.GetdecimalAsString(ColumnNames.TotalFactura)
				End If
			End Get
			Set(ByVal Value As String)
				If String.Empty = value Then
					Me.SetColumnNull(ColumnNames.TotalFactura)
				Else
					Me.TotalFactura = MyBase.SetdecimalAsString(ColumnNames.TotalFactura, Value)
				End If
			End Set
		End Property

		Public Overridable Property s_TotalFacturaSaldo As String
			Get
				If Me.IsColumnNull(ColumnNames.TotalFacturaSaldo) Then
					Return String.Empty
				Else
					Return MyBase.GetdecimalAsString(ColumnNames.TotalFacturaSaldo)
				End If
			End Get
			Set(ByVal Value As String)
				If String.Empty = value Then
					Me.SetColumnNull(ColumnNames.TotalFacturaSaldo)
				Else
					Me.TotalFacturaSaldo = MyBase.SetdecimalAsString(ColumnNames.TotalFacturaSaldo, Value)
				End If
			End Set
		End Property

		Public Overridable Property s_TotalFacturaIVA As String
			Get
				If Me.IsColumnNull(ColumnNames.TotalFacturaIVA) Then
					Return String.Empty
				Else
					Return MyBase.GetdecimalAsString(ColumnNames.TotalFacturaIVA)
				End If
			End Get
			Set(ByVal Value As String)
				If String.Empty = value Then
					Me.SetColumnNull(ColumnNames.TotalFacturaIVA)
				Else
					Me.TotalFacturaIVA = MyBase.SetdecimalAsString(ColumnNames.TotalFacturaIVA, Value)
				End If
			End Set
		End Property

		Public Overridable Property s_ActualizadoPor As String
			Get
				If Me.IsColumnNull(ColumnNames.ActualizadoPor) Then
					Return String.Empty
				Else
					Return MyBase.GetintAsString(ColumnNames.ActualizadoPor)
				End If
			End Get
			Set(ByVal Value As String)
				If String.Empty = value Then
					Me.SetColumnNull(ColumnNames.ActualizadoPor)
				Else
					Me.ActualizadoPor = MyBase.SetintAsString(ColumnNames.ActualizadoPor, Value)
				End If
			End Set
		End Property

		Public Overridable Property s_ActualizadoFecha As String
			Get
				If Me.IsColumnNull(ColumnNames.ActualizadoFecha) Then
					Return String.Empty
				Else
					Return MyBase.GetDateTimeAsString(ColumnNames.ActualizadoFecha)
				End If
			End Get
			Set(ByVal Value As String)
				If String.Empty = value Then
					Me.SetColumnNull(ColumnNames.ActualizadoFecha)
				Else
					Me.ActualizadoFecha = MyBase.SetDateTimeAsString(ColumnNames.ActualizadoFecha, Value)
				End If
			End Set
		End Property

		Public Overridable Property s_IdCaja As String
			Get
				If Me.IsColumnNull(ColumnNames.IdCaja) Then
					Return String.Empty
				Else
					Return MyBase.GetintAsString(ColumnNames.IdCaja)
				End If
			End Get
			Set(ByVal Value As String)
				If String.Empty = value Then
					Me.SetColumnNull(ColumnNames.IdCaja)
				Else
					Me.IdCaja = MyBase.SetintAsString(ColumnNames.IdCaja, Value)
				End If
			End Set
		End Property


	#End Region  	

	#Region "Where Clause"
    Public Class WhereClause

        Public Sub New(ByVal entity As BusinessEntity)
            Me._entity = entity
        End Sub
		
		Public ReadOnly Property TearOff As TearOffWhereParameter
			Get
				If _tearOff Is Nothing Then
					_tearOff = new TearOffWhereParameter(Me)
				End If

				Return _tearOff
			End Get
		End Property

		#Region "TearOff's"
		Public class TearOffWhereParameter

			Public Sub New(ByVal clause As WhereClause)
				Me._clause = clause
			End Sub
		
	
			Public ReadOnly Property IdCompra() As WhereParameter
				Get
					Dim where As WhereParameter = New WhereParameter(ColumnNames.IdCompra, Parameters.IdCompra)
                        Me._clause._entity.Query.AddWhereParameter(where)
                        Return where
                    End Get
                End Property

                Public ReadOnly Property NroComprobante() As WhereParameter
                    Get
                        Dim where As WhereParameter = New WhereParameter(ColumnNames.NroComprobante, Parameters.NroComprobante)
                        Me._clause._entity.Query.AddWhereParameter(where)
                        Return where
                    End Get
                End Property

                Public ReadOnly Property Fecha() As WhereParameter
                    Get
                        Dim where As WhereParameter = New WhereParameter(ColumnNames.Fecha, Parameters.Fecha)
                        Me._clause._entity.Query.AddWhereParameter(where)
                        Return where
                    End Get
                End Property

                Public ReadOnly Property IdProveedor() As WhereParameter
                    Get
                        Dim where As WhereParameter = New WhereParameter(ColumnNames.IdProveedor, Parameters.IdProveedor)
                        Me._clause._entity.Query.AddWhereParameter(where)
                        Return where
                    End Get
                End Property

                Public ReadOnly Property FechaVencimiento() As WhereParameter
                    Get
                        Dim where As WhereParameter = New WhereParameter(ColumnNames.FechaVencimiento, Parameters.FechaVencimiento)
                        Me._clause._entity.Query.AddWhereParameter(where)
                        Return where
                    End Get
                End Property

                Public ReadOnly Property Condicion() As WhereParameter
                    Get
                        Dim where As WhereParameter = New WhereParameter(ColumnNames.Condicion, Parameters.Condicion)
                        Me._clause._entity.Query.AddWhereParameter(where)
                        Return where
                    End Get
                End Property

                Public ReadOnly Property Estado() As WhereParameter
                    Get
                        Dim where As WhereParameter = New WhereParameter(ColumnNames.Estado, Parameters.Estado)
                        Me._clause._entity.Query.AddWhereParameter(where)
                        Return where
                    End Get
                End Property

                Public ReadOnly Property IdOrdenCompra() As WhereParameter
                    Get
                        Dim where As WhereParameter = New WhereParameter(ColumnNames.IdOrdenCompra, Parameters.IdOrdenCompra)
                        Me._clause._entity.Query.AddWhereParameter(where)
                        Return where
                    End Get
                End Property

                Public ReadOnly Property IdAdministrador() As WhereParameter
                    Get
                        Dim where As WhereParameter = New WhereParameter(ColumnNames.IdAdministrador, Parameters.IdAdministrador)
                        Me._clause._entity.Query.AddWhereParameter(where)
                        Return where
                    End Get
                End Property

                Public ReadOnly Property TotalFactura() As WhereParameter
                    Get
                        Dim where As WhereParameter = New WhereParameter(ColumnNames.TotalFactura, Parameters.TotalFactura)
                        Me._clause._entity.Query.AddWhereParameter(where)
                        Return where
                    End Get
                End Property

                Public ReadOnly Property TotalFacturaSaldo() As WhereParameter
                    Get
                        Dim where As WhereParameter = New WhereParameter(ColumnNames.TotalFacturaSaldo, Parameters.TotalFacturaSaldo)
                        Me._clause._entity.Query.AddWhereParameter(where)
                        Return where
                    End Get
                End Property

                Public ReadOnly Property TotalFacturaIVA() As WhereParameter
                    Get
                        Dim where As WhereParameter = New WhereParameter(ColumnNames.TotalFacturaIVA, Parameters.TotalFacturaIVA)
                        Me._clause._entity.Query.AddWhereParameter(where)
                        Return where
                    End Get
                End Property

                Public ReadOnly Property ActualizadoPor() As WhereParameter
                    Get
                        Dim where As WhereParameter = New WhereParameter(ColumnNames.ActualizadoPor, Parameters.ActualizadoPor)
                        Me._clause._entity.Query.AddWhereParameter(where)
                        Return where
                    End Get
                End Property

                Public ReadOnly Property ActualizadoFecha() As WhereParameter
                    Get
                        Dim where As WhereParameter = New WhereParameter(ColumnNames.ActualizadoFecha, Parameters.ActualizadoFecha)
                        Me._clause._entity.Query.AddWhereParameter(where)
                        Return where
                    End Get
                End Property

                Public ReadOnly Property IdCaja() As WhereParameter
                    Get
                        Dim where As WhereParameter = New WhereParameter(ColumnNames.IdCaja, Parameters.IdCaja)
                        Me._clause._entity.Query.AddWhereParameter(where)
                        Return where
                    End Get
                End Property


			Private _clause as WhereClause
		End Class
		#End Region	

		Public ReadOnly Property IdCompra() As WhereParameter 
			Get
				If _IdCompra_W Is Nothing Then
					_IdCompra_W = TearOff.IdCompra
				End If
				Return _IdCompra_W
			End Get
		End Property

		Public ReadOnly Property NroComprobante() As WhereParameter 
			Get
				If _NroComprobante_W Is Nothing Then
					_NroComprobante_W = TearOff.NroComprobante
				End If
				Return _NroComprobante_W
			End Get
		End Property

		Public ReadOnly Property Fecha() As WhereParameter 
			Get
				If _Fecha_W Is Nothing Then
					_Fecha_W = TearOff.Fecha
				End If
				Return _Fecha_W
			End Get
		End Property

		Public ReadOnly Property IdProveedor() As WhereParameter 
			Get
				If _IdProveedor_W Is Nothing Then
					_IdProveedor_W = TearOff.IdProveedor
				End If
				Return _IdProveedor_W
			End Get
		End Property

		Public ReadOnly Property FechaVencimiento() As WhereParameter 
			Get
				If _FechaVencimiento_W Is Nothing Then
					_FechaVencimiento_W = TearOff.FechaVencimiento
				End If
				Return _FechaVencimiento_W
			End Get
		End Property

		Public ReadOnly Property Condicion() As WhereParameter 
			Get
				If _Condicion_W Is Nothing Then
					_Condicion_W = TearOff.Condicion
				End If
				Return _Condicion_W
			End Get
		End Property

		Public ReadOnly Property Estado() As WhereParameter 
			Get
				If _Estado_W Is Nothing Then
					_Estado_W = TearOff.Estado
				End If
				Return _Estado_W
			End Get
		End Property

		Public ReadOnly Property IdOrdenCompra() As WhereParameter 
			Get
				If _IdOrdenCompra_W Is Nothing Then
					_IdOrdenCompra_W = TearOff.IdOrdenCompra
				End If
				Return _IdOrdenCompra_W
			End Get
		End Property

		Public ReadOnly Property IdAdministrador() As WhereParameter 
			Get
				If _IdAdministrador_W Is Nothing Then
					_IdAdministrador_W = TearOff.IdAdministrador
				End If
				Return _IdAdministrador_W
			End Get
		End Property

		Public ReadOnly Property TotalFactura() As WhereParameter 
			Get
				If _TotalFactura_W Is Nothing Then
					_TotalFactura_W = TearOff.TotalFactura
				End If
				Return _TotalFactura_W
			End Get
		End Property

		Public ReadOnly Property TotalFacturaSaldo() As WhereParameter 
			Get
				If _TotalFacturaSaldo_W Is Nothing Then
					_TotalFacturaSaldo_W = TearOff.TotalFacturaSaldo
				End If
				Return _TotalFacturaSaldo_W
			End Get
		End Property

		Public ReadOnly Property TotalFacturaIVA() As WhereParameter 
			Get
				If _TotalFacturaIVA_W Is Nothing Then
					_TotalFacturaIVA_W = TearOff.TotalFacturaIVA
				End If
				Return _TotalFacturaIVA_W
			End Get
		End Property

		Public ReadOnly Property ActualizadoPor() As WhereParameter 
			Get
				If _ActualizadoPor_W Is Nothing Then
					_ActualizadoPor_W = TearOff.ActualizadoPor
				End If
				Return _ActualizadoPor_W
			End Get
		End Property

		Public ReadOnly Property ActualizadoFecha() As WhereParameter 
			Get
				If _ActualizadoFecha_W Is Nothing Then
					_ActualizadoFecha_W = TearOff.ActualizadoFecha
				End If
				Return _ActualizadoFecha_W
			End Get
		End Property

		Public ReadOnly Property IdCaja() As WhereParameter 
			Get
				If _IdCaja_W Is Nothing Then
					_IdCaja_W = TearOff.IdCaja
				End If
				Return _IdCaja_W
			End Get
		End Property

		Private _IdCompra_W As WhereParameter = Nothing
		Private _NroComprobante_W As WhereParameter = Nothing
		Private _Fecha_W As WhereParameter = Nothing
		Private _IdProveedor_W As WhereParameter = Nothing
		Private _FechaVencimiento_W As WhereParameter = Nothing
		Private _Condicion_W As WhereParameter = Nothing
		Private _Estado_W As WhereParameter = Nothing
		Private _IdOrdenCompra_W As WhereParameter = Nothing
		Private _IdAdministrador_W As WhereParameter = Nothing
		Private _TotalFactura_W As WhereParameter = Nothing
		Private _TotalFacturaSaldo_W As WhereParameter = Nothing
		Private _TotalFacturaIVA_W As WhereParameter = Nothing
		Private _ActualizadoPor_W As WhereParameter = Nothing
		Private _ActualizadoFecha_W As WhereParameter = Nothing
		Private _IdCaja_W As WhereParameter = Nothing

			Public Sub WhereClauseReset()

			_IdCompra_W = Nothing
			_NroComprobante_W = Nothing
			_Fecha_W = Nothing
			_IdProveedor_W = Nothing
			_FechaVencimiento_W = Nothing
			_Condicion_W = Nothing
			_Estado_W = Nothing
			_IdOrdenCompra_W = Nothing
			_IdAdministrador_W = Nothing
			_TotalFactura_W = Nothing
			_TotalFacturaSaldo_W = Nothing
			_TotalFacturaIVA_W = Nothing
			_ActualizadoPor_W = Nothing
			_ActualizadoFecha_W = Nothing
			_IdCaja_W = Nothing
				Me._entity.Query.FlushWhereParameters()

			End Sub
	
		Private _entity As BusinessEntity
		Private _tearOff As TearOffWhereParameter
    End Class	

	Public ReadOnly Property Where() As WhereClause
		Get
			If _whereClause Is Nothing Then
				_whereClause = New WhereClause(Me)
			End If
	
			Return _whereClause
		End Get
	End Property
	
	Private _whereClause As WhereClause = Nothing	
#End Region	

#Region "Aggregate Clause"
    Public Class AggregateClause

        Public Sub New(ByVal entity As BusinessEntity)
            Me._entity = entity
        End Sub
		
		Public ReadOnly Property TearOff As TearOffAggregateParameter
			Get
				If _tearOff Is Nothing Then
					_tearOff = new TearOffAggregateParameter(Me)
				End If

				Return _tearOff
			End Get
		End Property

		#Region "AggregateParameter TearOff's"
		Public class TearOffAggregateParameter

			Public Sub New(ByVal clause As AggregateClause)
				Me._clause = clause
			End Sub
		
	
		Public ReadOnly Property IdCompra() As AggregateParameter
			Get
				Dim where As AggregateParameter = New AggregateParameter(ColumnNames.IdCompra, Parameters.IdCompra)
				Me._clause._entity.Query.AddAggregateParameter(where)
				Return where
			End Get
		End Property

		Public ReadOnly Property NroComprobante() As AggregateParameter
			Get
				Dim where As AggregateParameter = New AggregateParameter(ColumnNames.NroComprobante, Parameters.NroComprobante)
				Me._clause._entity.Query.AddAggregateParameter(where)
				Return where
			End Get
		End Property

		Public ReadOnly Property Fecha() As AggregateParameter
			Get
				Dim where As AggregateParameter = New AggregateParameter(ColumnNames.Fecha, Parameters.Fecha)
				Me._clause._entity.Query.AddAggregateParameter(where)
				Return where
			End Get
		End Property

		Public ReadOnly Property IdProveedor() As AggregateParameter
			Get
				Dim where As AggregateParameter = New AggregateParameter(ColumnNames.IdProveedor, Parameters.IdProveedor)
				Me._clause._entity.Query.AddAggregateParameter(where)
				Return where
			End Get
		End Property

		Public ReadOnly Property FechaVencimiento() As AggregateParameter
			Get
				Dim where As AggregateParameter = New AggregateParameter(ColumnNames.FechaVencimiento, Parameters.FechaVencimiento)
				Me._clause._entity.Query.AddAggregateParameter(where)
				Return where
			End Get
		End Property

		Public ReadOnly Property Condicion() As AggregateParameter
			Get
				Dim where As AggregateParameter = New AggregateParameter(ColumnNames.Condicion, Parameters.Condicion)
				Me._clause._entity.Query.AddAggregateParameter(where)
				Return where
			End Get
		End Property

		Public ReadOnly Property Estado() As AggregateParameter
			Get
				Dim where As AggregateParameter = New AggregateParameter(ColumnNames.Estado, Parameters.Estado)
				Me._clause._entity.Query.AddAggregateParameter(where)
				Return where
			End Get
		End Property

		Public ReadOnly Property IdOrdenCompra() As AggregateParameter
			Get
				Dim where As AggregateParameter = New AggregateParameter(ColumnNames.IdOrdenCompra, Parameters.IdOrdenCompra)
				Me._clause._entity.Query.AddAggregateParameter(where)
				Return where
			End Get
		End Property

		Public ReadOnly Property IdAdministrador() As AggregateParameter
			Get
				Dim where As AggregateParameter = New AggregateParameter(ColumnNames.IdAdministrador, Parameters.IdAdministrador)
				Me._clause._entity.Query.AddAggregateParameter(where)
				Return where
			End Get
		End Property

		Public ReadOnly Property TotalFactura() As AggregateParameter
			Get
				Dim where As AggregateParameter = New AggregateParameter(ColumnNames.TotalFactura, Parameters.TotalFactura)
				Me._clause._entity.Query.AddAggregateParameter(where)
				Return where
			End Get
		End Property

		Public ReadOnly Property TotalFacturaSaldo() As AggregateParameter
			Get
				Dim where As AggregateParameter = New AggregateParameter(ColumnNames.TotalFacturaSaldo, Parameters.TotalFacturaSaldo)
				Me._clause._entity.Query.AddAggregateParameter(where)
				Return where
			End Get
		End Property

		Public ReadOnly Property TotalFacturaIVA() As AggregateParameter
			Get
				Dim where As AggregateParameter = New AggregateParameter(ColumnNames.TotalFacturaIVA, Parameters.TotalFacturaIVA)
				Me._clause._entity.Query.AddAggregateParameter(where)
				Return where
			End Get
		End Property

		Public ReadOnly Property ActualizadoPor() As AggregateParameter
			Get
				Dim where As AggregateParameter = New AggregateParameter(ColumnNames.ActualizadoPor, Parameters.ActualizadoPor)
				Me._clause._entity.Query.AddAggregateParameter(where)
				Return where
			End Get
		End Property

		Public ReadOnly Property ActualizadoFecha() As AggregateParameter
			Get
				Dim where As AggregateParameter = New AggregateParameter(ColumnNames.ActualizadoFecha, Parameters.ActualizadoFecha)
				Me._clause._entity.Query.AddAggregateParameter(where)
				Return where
			End Get
		End Property

		Public ReadOnly Property IdCaja() As AggregateParameter
			Get
				Dim where As AggregateParameter = New AggregateParameter(ColumnNames.IdCaja, Parameters.IdCaja)
				Me._clause._entity.Query.AddAggregateParameter(where)
				Return where
			End Get
		End Property


			Private _clause as AggregateClause
		End Class
		#End Region	

		Public ReadOnly Property IdCompra() As AggregateParameter 
			Get
				If _IdCompra_W Is Nothing Then
					_IdCompra_W = TearOff.IdCompra
				End If
				Return _IdCompra_W
			End Get
		End Property

		Public ReadOnly Property NroComprobante() As AggregateParameter 
			Get
				If _NroComprobante_W Is Nothing Then
					_NroComprobante_W = TearOff.NroComprobante
				End If
				Return _NroComprobante_W
			End Get
		End Property

		Public ReadOnly Property Fecha() As AggregateParameter 
			Get
				If _Fecha_W Is Nothing Then
					_Fecha_W = TearOff.Fecha
				End If
				Return _Fecha_W
			End Get
		End Property

		Public ReadOnly Property IdProveedor() As AggregateParameter 
			Get
				If _IdProveedor_W Is Nothing Then
					_IdProveedor_W = TearOff.IdProveedor
				End If
				Return _IdProveedor_W
			End Get
		End Property

		Public ReadOnly Property FechaVencimiento() As AggregateParameter 
			Get
				If _FechaVencimiento_W Is Nothing Then
					_FechaVencimiento_W = TearOff.FechaVencimiento
				End If
				Return _FechaVencimiento_W
			End Get
		End Property

		Public ReadOnly Property Condicion() As AggregateParameter 
			Get
				If _Condicion_W Is Nothing Then
					_Condicion_W = TearOff.Condicion
				End If
				Return _Condicion_W
			End Get
		End Property

		Public ReadOnly Property Estado() As AggregateParameter 
			Get
				If _Estado_W Is Nothing Then
					_Estado_W = TearOff.Estado
				End If
				Return _Estado_W
			End Get
		End Property

		Public ReadOnly Property IdOrdenCompra() As AggregateParameter 
			Get
				If _IdOrdenCompra_W Is Nothing Then
					_IdOrdenCompra_W = TearOff.IdOrdenCompra
				End If
				Return _IdOrdenCompra_W
			End Get
		End Property

		Public ReadOnly Property IdAdministrador() As AggregateParameter 
			Get
				If _IdAdministrador_W Is Nothing Then
					_IdAdministrador_W = TearOff.IdAdministrador
				End If
				Return _IdAdministrador_W
			End Get
		End Property

		Public ReadOnly Property TotalFactura() As AggregateParameter 
			Get
				If _TotalFactura_W Is Nothing Then
					_TotalFactura_W = TearOff.TotalFactura
				End If
				Return _TotalFactura_W
			End Get
		End Property

		Public ReadOnly Property TotalFacturaSaldo() As AggregateParameter 
			Get
				If _TotalFacturaSaldo_W Is Nothing Then
					_TotalFacturaSaldo_W = TearOff.TotalFacturaSaldo
				End If
				Return _TotalFacturaSaldo_W
			End Get
		End Property

		Public ReadOnly Property TotalFacturaIVA() As AggregateParameter 
			Get
				If _TotalFacturaIVA_W Is Nothing Then
					_TotalFacturaIVA_W = TearOff.TotalFacturaIVA
				End If
				Return _TotalFacturaIVA_W
			End Get
		End Property

		Public ReadOnly Property ActualizadoPor() As AggregateParameter 
			Get
				If _ActualizadoPor_W Is Nothing Then
					_ActualizadoPor_W = TearOff.ActualizadoPor
				End If
				Return _ActualizadoPor_W
			End Get
		End Property

		Public ReadOnly Property ActualizadoFecha() As AggregateParameter 
			Get
				If _ActualizadoFecha_W Is Nothing Then
					_ActualizadoFecha_W = TearOff.ActualizadoFecha
				End If
				Return _ActualizadoFecha_W
			End Get
		End Property

		Public ReadOnly Property IdCaja() As AggregateParameter 
			Get
				If _IdCaja_W Is Nothing Then
					_IdCaja_W = TearOff.IdCaja
				End If
				Return _IdCaja_W
			End Get
		End Property

		Private _IdCompra_W As AggregateParameter = Nothing
		Private _NroComprobante_W As AggregateParameter = Nothing
		Private _Fecha_W As AggregateParameter = Nothing
		Private _IdProveedor_W As AggregateParameter = Nothing
		Private _FechaVencimiento_W As AggregateParameter = Nothing
		Private _Condicion_W As AggregateParameter = Nothing
		Private _Estado_W As AggregateParameter = Nothing
		Private _IdOrdenCompra_W As AggregateParameter = Nothing
		Private _IdAdministrador_W As AggregateParameter = Nothing
		Private _TotalFactura_W As AggregateParameter = Nothing
		Private _TotalFacturaSaldo_W As AggregateParameter = Nothing
		Private _TotalFacturaIVA_W As AggregateParameter = Nothing
		Private _ActualizadoPor_W As AggregateParameter = Nothing
		Private _ActualizadoFecha_W As AggregateParameter = Nothing
		Private _IdCaja_W As AggregateParameter = Nothing

		Public Sub AggregateClauseReset()

		_IdCompra_W = Nothing
		_NroComprobante_W = Nothing
		_Fecha_W = Nothing
		_IdProveedor_W = Nothing
		_FechaVencimiento_W = Nothing
		_Condicion_W = Nothing
		_Estado_W = Nothing
		_IdOrdenCompra_W = Nothing
		_IdAdministrador_W = Nothing
		_TotalFactura_W = Nothing
		_TotalFacturaSaldo_W = Nothing
		_TotalFacturaIVA_W = Nothing
		_ActualizadoPor_W = Nothing
		_ActualizadoFecha_W = Nothing
		_IdCaja_W = Nothing
			Me._entity.Query.FlushAggregateParameters()

		End Sub
	
		Private _entity As BusinessEntity
		Private _tearOff As TearOffAggregateParameter
    End Class	

	Public ReadOnly Property Aggregate() As AggregateClause
		Get
			If _aggregateClause Is Nothing Then
				_aggregateClause = New AggregateClause(Me)
			End If
	
			Return _aggregateClause
		End Get
	End Property
	
	Private _aggregateClause As AggregateClause = Nothing	
#End Region	

	Protected Overrides Function GetInsertCommand() As IDbCommand
	
		Dim cmd As SqlCommand = New SqlCommand
		cmd.CommandType = CommandType.StoredProcedure
		cmd.CommandText = "[" + Me.SchemaStoredProcedure + "proc_si_compraInsert]" 
	    
		CreateParameters(cmd)
		
		Dim p As SqlParameter
		p = cmd.Parameters(Parameters.IdCompra.ParameterName)
		p.Direction = ParameterDirection.Output
    
		Return cmd 

  	End Function
	
	Protected Overrides Function GetUpdateCommand() As IDbCommand
	
		Dim cmd As SqlCommand = New SqlCommand
		cmd.CommandType = CommandType.StoredProcedure    
		cmd.CommandText = "[" + Me.SchemaStoredProcedure + "proc_si_compraUpdate]" 
		
		CreateParameters(cmd) 
		    
		Return cmd
	
	End Function	
	
	Protected Overrides Function GetDeleteCommand() As IDbCommand
	
		Dim cmd As SqlCommand = New SqlCommand
		cmd.CommandType = CommandType.StoredProcedure    
		cmd.CommandText = "[" + Me.SchemaStoredProcedure + "proc_si_compraDelete]" 
		
		Dim p As SqlParameter
		p = cmd.Parameters.Add(Parameters.IdCompra)
		p.SourceColumn = ColumnNames.IdCompra
		p.SourceVersion = DataRowVersion.Current

  
		Return cmd
	
	End Function	
	
	Private Sub CreateParameters(ByVal cmd As SqlCommand)
	
		Dim p As SqlParameter
		p = cmd.Parameters.Add(Parameters.IdCompra)
		p.SourceColumn = ColumnNames.IdCompra
		p.SourceVersion = DataRowVersion.Current

		p = cmd.Parameters.Add(Parameters.NroComprobante)
		p.SourceColumn = ColumnNames.NroComprobante
		p.SourceVersion = DataRowVersion.Current

		p = cmd.Parameters.Add(Parameters.Fecha)
		p.SourceColumn = ColumnNames.Fecha
		p.SourceVersion = DataRowVersion.Current

		p = cmd.Parameters.Add(Parameters.IdProveedor)
		p.SourceColumn = ColumnNames.IdProveedor
		p.SourceVersion = DataRowVersion.Current

		p = cmd.Parameters.Add(Parameters.FechaVencimiento)
		p.SourceColumn = ColumnNames.FechaVencimiento
		p.SourceVersion = DataRowVersion.Current

		p = cmd.Parameters.Add(Parameters.Condicion)
		p.SourceColumn = ColumnNames.Condicion
		p.SourceVersion = DataRowVersion.Current

		p = cmd.Parameters.Add(Parameters.Estado)
		p.SourceColumn = ColumnNames.Estado
		p.SourceVersion = DataRowVersion.Current

		p = cmd.Parameters.Add(Parameters.IdOrdenCompra)
		p.SourceColumn = ColumnNames.IdOrdenCompra
		p.SourceVersion = DataRowVersion.Current

		p = cmd.Parameters.Add(Parameters.IdAdministrador)
		p.SourceColumn = ColumnNames.IdAdministrador
		p.SourceVersion = DataRowVersion.Current

		p = cmd.Parameters.Add(Parameters.TotalFactura)
		p.SourceColumn = ColumnNames.TotalFactura
		p.SourceVersion = DataRowVersion.Current

		p = cmd.Parameters.Add(Parameters.TotalFacturaSaldo)
		p.SourceColumn = ColumnNames.TotalFacturaSaldo
		p.SourceVersion = DataRowVersion.Current

		p = cmd.Parameters.Add(Parameters.TotalFacturaIVA)
		p.SourceColumn = ColumnNames.TotalFacturaIVA
		p.SourceVersion = DataRowVersion.Current

		p = cmd.Parameters.Add(Parameters.ActualizadoPor)
		p.SourceColumn = ColumnNames.ActualizadoPor
		p.SourceVersion = DataRowVersion.Current

		p = cmd.Parameters.Add(Parameters.ActualizadoFecha)
		p.SourceColumn = ColumnNames.ActualizadoFecha
		p.SourceVersion = DataRowVersion.Current

		p = cmd.Parameters.Add(Parameters.IdCaja)
		p.SourceColumn = ColumnNames.IdCaja
		p.SourceVersion = DataRowVersion.Current


	End Sub	

End Class

End NameSpace

